﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Common="clr-namespace:Snipps.Infrastructure">

    <ResourceDictionary.MergedDictionaries>
        <Common:SharedResourceDictionary Source="/Snipps;component/Resources/ControlTemplates/ValidationErrorTemplate.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="ErrorTextBlockStyle"
           TargetType="{x:Type TextBlock}">

        <Setter Property="Padding" Value="6,2,6,2" />
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationErrorTemplate}" />
        <Setter Property="Visibility" Value="Collapsed" />
        <Style.Triggers>
            <Trigger Property="Validation.HasError" Value="True">
                <Setter Property="Visibility" Value="Visible" />
            </Trigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>